<script>
	
	$(function() {
		$("button").button();
		
		$( "#pfuAccordion" ).accordion({
			fillSpace: false,
			autoHeight: false,
			navigation: true,
			collapsible: true
		});
	})
	
	function loadPFUPage(page){
		$("#pfuRightPanelContent").load(page);
	}
	
	function loadPFUPageWithReq(request, page) {
        $.post(request, function(data) {
            $("#pfuRightPanelContent").load(page);
        });
    }
	
	function addMethodology(){
		loadPFUPage("content/project/productFollowUp/productionPhase/addProdMethodology.jsp");
	}
	
	function addManufRes(){
		loadPFUPage("content/project/productFollowUp/productionPhase/addManufResource.jsp");
	}
	
	function viewData(){
		loadPFUPageWithReq("/proddev/controller?manager=dataAccessManager&method=31","content/project/productFollowUp/productionPhase/viewProductionData.jsp");
	}
	
	function getSuggestions(){
		loadPFUPageWithReq("/proddev/controller?manager=dataAccessManager&method=32","content/project/productFollowUp/usePhase/getUserSuggestions.jsp");
	}
	
	function getComplaints(){
		loadPFUPageWithReq("/proddev/controller?manager=dataAccessManager&method=33","content/project/productFollowUp/supportPhase/getUserComplaints.jsp");
	}
</script>

<div id="pfuAccordion">
	<div style="padding-left:5px;"><a href="#"><b>Production Phase</b></a></div>
		<div id="productionButtons" style="padding:1em 0">
			<div style="width:90%; margin-left:auto; margin-right:auto">
				<button id="addMethodology" name="addMethodology" onclick="addMethodology()" style="width:100%; ">Add methodology</button>
				<button id="addManufRes" name="addManufRes" onclick="addManufRes()" style="width:100%; margin-top:5px;">Add process resource</button>
				<button id="viewData" name="viewData" onclick="viewData()" style="width:100%; margin-top:5px;">View existing data</button>
			</div>
		</div>
	<div style="padding-left:5px;"><a href="#"><b>Use Phase</b></a></div>
		<div id="useButtons" style="padding:1em 0">
			<div style="width:90%; margin-left:auto; margin-right:auto">
				<button id="getSuggestions" name="getSuggestions" onclick="getSuggestions()" style="width:100%; ">Get user suggestions</button>
			</div>
		</div>
	<div style="padding-left:5px;"><a href="#"><b>Support Phase</b></a></div>
		<div id="supportButtons" style="padding:1em 0">
			<div style="width:90%; margin-left:auto; margin-right:auto">
				<button id="getComplaints" name="getComplaints" onclick="getComplaints()" style="width:100%; ">Get user complaints</button>
			</div>
		</div>
	<div style="padding-left:5px;"><a href="#"><b>Retirement Phase</b></a></div>
		<div id="retirementButtons" style="padding:1em 0">
			<div style="width:90%; margin-left:auto; margin-right:auto">
				<button id="addRetirementInfo" name="addRetirementInfo" onclick="addRetirementInfo()" style="width:100%; ">Add retirement info</button>
			</div>
		</div>
</div>